<?php

namespace App\Admin\Controllers\access\actions;

use Encore\Admin\Actions\RowAction;

class ExporterAccess extends RowAction
{
    public $name = '导出成绩';

//    public function href()
//    {
//        return '/admin/access-exports/?access_id='.$this->getKey();
//    }

    public function handle()
    {
        return $this->response()->success('导出完成！')->download('/admin/access-exports/?access_id='.$this->getKey());
    }

//    public function html()
//    {
//        return <<<HTML
//        <a class="btn btn-sm btn-success import-post1" target="_blank" href="/admin/access-exports/?access_id=$this->getKey()"><i class="fa fa-upload"></i>导出成绩</a>
//HTML;
//    }

}